home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Patterns.dxr / 00004_Extend parent.ls < prev    next >
Encoding:
Text File  |  1998-09-16  |  1.8 KB  |  68 lines

  1. property skillLevel, button, blank1, blank2, blank3, ansBlank1, ansBlank2, ansBlank3
  2.  
  3. on new me
  4.   set the button of me to [#challenge: EMPTY, #more: EMPTY, #most: EMPTY]
  5.   set the blank1 of me to [#challenge: 0, #more: #empty, #most: #empty]
  6.   set the blank2 of me to [#challenge: 0, #more: #empty, #most: #empty]
  7.   set the blank3 of me to [#challenge: 0, #more: #empty, #most: #empty]
  8.   set the ansBlank1 of me to [#challenge: 0, #more: 0, #most: 0]
  9.   set the ansBlank2 of me to [#challenge: 0, #more: 0, #most: 0]
  10.   set the ansBlank3 of me to [#challenge: 0, #more: 0, #most: 0]
  11.   return me
  12. end
  13.  
  14. on setModule me, thisModule
  15.   set the skillLevel of me to thisModule
  16. end
  17.  
  18. on setButton me, buttonclicked
  19.   setProp(the button of me, the skillLevel of me, buttonclicked)
  20. end
  21.  
  22. on setBlanks me, state1, state2, state3
  23.   setProp(the blank1 of me, the skillLevel of me, state1)
  24.   setProp(the blank2 of me, the skillLevel of me, state2)
  25.   setProp(the blank3 of me, the skillLevel of me, state3)
  26. end
  27.  
  28. on setOneBlank me, blank, state1
  29.   setProp(blank, the skillLevel of me, state1)
  30. end
  31.  
  32. on getOneBlank me, blank
  33.   return getProp(blank, the skillLevel of me)
  34. end
  35.  
  36. on getModule me
  37.   set curModule to the skillLevel of me
  38.   return curModule
  39. end
  40.  
  41. on getBlank1 me
  42.   set blank to getProp(the blank1 of me, the skillLevel of me)
  43.   return blank
  44. end
  45.  
  46. on getBlank2 me
  47.   set blank to getProp(the blank2 of me, the skillLevel of me)
  48.   return blank
  49. end
  50.  
  51. on getBlank3 me
  52.   set blank to getProp(the blank3 of me, the skillLevel of me)
  53.   return blank
  54. end
  55.  
  56. on getButton me
  57.   set buttClicked to getProp(the button of me, the skillLevel of me)
  58.   return buttClicked
  59. end
  60.  
  61. on showProperties me
  62.   put "skillLevel:" && the skillLevel of me
  63.   put "button:" && the button of me
  64.   put "blank1:" && the blank1 of me
  65.   put "blank2:" && the blank2 of me
  66.   put "blank3:" && the blank3 of me
  67. end
  68.